package com.tarzan.oauth.feign.fallbackfactory;

import com.tarzan.oauth.feign.RemotPermissionsService;
import com.tarzan.oauth.feign.fallback.RemotPermissionsServiceFallbackImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Package com.tarzan.oauth.feign.fallbackfactory
 * @Title RemotPermissionsServiceFallbackFactory
 * @Description TODO
 * @Author liujinshan
 * @CreateTime 2021/7/2 10:37
 */
@Component
public class RemotPermissionsServiceFallbackFactory  implements FallbackFactory<RemotPermissionsService> {



    @Override
    public RemotPermissionsService create(Throwable cause) {
        RemotPermissionsServiceFallbackImpl permissionsServiceFallback = new RemotPermissionsServiceFallbackImpl();
        permissionsServiceFallback.setCause(cause);
        return permissionsServiceFallback;
    }
}
